<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>男装专区</title>
    <link rel="stylesheet" type="text/css" href="css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/loading.css"/>
    <link rel="stylesheet" type="text/css" href="css/base.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link rel="stylesheet" href="css/mui.css" />
    <script type="text/javascript" src="js/mui.js" ></script>
      <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    	$(window).load(function(){
    		$(".loading").addClass("loader-chanage")
    		$(".loading").fadeOut(300)
    	})
    </script>
</head>
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
<body>
	<header class="mui-bar mui-bar-nav">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">地址详情</h1>
	</header>
	
	<div class="contaniner fixed-conta">
		<form action="" method="post" class="change-address" id="save">
			<ul>
				<li>
					<label class="addd">收货人：</label>
					<input type="text" id="suser" required="required"/>
				</li>
				<li>
					<label class="addd">手机号：</label>
					<input type="tel" id="sphone" required="required"/>
				</li>
				<li>
					<label class="addd">所在地区：</label>
					<select id="site1">
						<option>安徽省</option>
						<option>安徽省</option>
						<option>安徽省</option>
					</select>
					<select id="site2">
						<option>合肥市</option>
						<option>安庆市</option>
						<option>上海市</option>
					</select>
					<select id="site3">
						<option>高新区</option>
						<option>蜀山区</option>
						<option>庐阳区</option>
					</select>
				</li>
				<li>
					<label class="addd">详细地址：</label>
					<textarea id="site4" required="required"></textarea>
				</li>
			</ul>
			
			<ul>
				<li class="" id="">
					<label style="font-size: 15px;">设置为默认地址</label>
					<div id="btnmoren" onclick="btnmoren1(this)" style="float:right;border-style: write; border-width: 1px;font-size:20px;">非默认</div>
				</li>
			</ul>
			<ul>
				<li>
					<h3>删除此地址</h3>
				</li>
			</ul>
			<!--<input type="submit" onclick="doclick(userid,suser,sphone,ssite,scode)" value="保存" />-->
			<button type="button" onclick="doclick()">保存</button>
		</form>
	</div>
	
	<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(".checkboxa label").on('touchstart',function(){
			if($(this).hasClass('checkd')){
				$(".checkboxa label").removeClass("checkd");
			}else{
				$(".checkboxa label").addClass("checkd");
			}
		})
	</script>
	<script>		
		function btnmoren1(obj){
			//默认选择
			if(obj.innerHTML=="默认"){
				obj.style.background="#fff";
				obj.style.color="#000";
				obj.innerHTML="非默认";
			}else{
				obj.style.background="green";
				obj.innerHTML="默认";
			}
		}
		function doclick(){
			alert($("#btnmoren").html());
			var ssitee=$("#site1").val()+$("#site2").val()+$("#site3").val()+$("#site4").val();
			//alert(ssite);
			$.post("http://192.168.43.241:8080/shop/saveUserSite.do",
			{
				userid:111111111,
				suser:$("#suser").val(),
				sphone:$("#sphone").val(),
				ssite:ssitee,
				scode:$("#btnmoren").html()
			},
			function(data){
				alert("提交成功");	
			});
			/*$.ajax({
				url : "http://192.168.43.241:8080/shop/saveUserSite.do",	
				async : false,	
				type : 'POST',	
				contentType:"application/json;charset=UTF-8",	
				dataType : 'jsonp',	
				data :""+JSON.stringify(site),	
				success : function(data) {		
					alert("成功");	
				}			
			});*/
		}
		
	</script>

</body>
</html>